#ifndef ABSTRACTTREEPROXYMODEL_H
#define ABSTRACTTREEPROXYMODEL_H



#include "proxies_global.h"
#include "AbstractItemProxyModel.h"



typedef QMap<ProxyIndex, IndexMap> SubIndexMap;



class PROXIESSHARED_EXPORT AbstractTreeProxyModel : public AbstractItemProxyModel
{
    Q_OBJECT
public:

    AbstractTreeProxyModel(QObject *parent = 0);

    virtual QModelIndex index(int row, int column, const QModelIndex &parent) const;
    virtual QModelIndex parent(const QModelIndex &child) const;

    virtual int rowCount(const QModelIndex &parent) const;

    virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
    virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const;

    virtual void addChildMapping(const ProxyIndex& parent, const SourceIndex& source, const ProxyIndex& proxy);


protected slots:

    virtual void clear();


protected:

    SubIndexMap m_children;


};



#endif // ABSTRACTTREEPROXYMODEL_H
